package com.gaga.console.core.controller.common;


import com.gaga.common.path.ApiPath;
import com.gaga.common.result.AudioDeviceResult;
import com.gaga.common.result.Result;
import com.gaga.common.utils.DeviceInfoUtils;
import com.gaga.console.base.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * 前端控制器
 *
 * @author liujia
 * @since 2022-06-01
 */
@Api(tags = "通用模块-设备信息")
@RestController
@RequestMapping(ApiPath.ROOT + "/common/device")
public class DeviceController extends BaseController {

    @ApiOperation(value = "获取设备列表")
    @GetMapping("/getDeivceInfoList")
    public Result<List<AudioDeviceResult>> getDeivceInfoList() {
        return Result.ok(DeviceInfoUtils.getAudioDeviceList());
    }
}
